/**
 * Created by Forcs on 16/4/11.
 */

var MainController = require('./controllers/MainController');
var ProductController = require('./controllers/ProductController');
var ActionController = require('./controllers/ActionController');
var PageController = require('./controllers/PageController');
var FlavorController = require('./controllers/FlavorController');
var Api2Controller = require('./controllers/Api2Controller');
var StatusController = require('./controllers/StatusController');
var IdentityController = require('./controllers/IdentityController');

var LogRecycler = require('./services/LogRecycler');
var Configuration = require('./services/Configuration');
var models = require('./models/');

module.exports = {
  application: {
    debug: true,
    log: require('./utils/log/config'),
    db: {
      host: '127.0.0.1',
      port: 27017,
      name: 'test'
    }
  },
  controllers: {
    'index': MainController,
    'product': ProductController,
    'action': ActionController,
    'page': PageController,
    'flavor': FlavorController,
    'status': StatusController,
    'identity': IdentityController,
    'api': Api2Controller
  },
  services: {
    LogRecycler,
    Configuration
  },
  models: {
    require: models,
    rel: {
      'Products': [ models.VisitedTotal ],
      'Flavors': [ models.VisitedTotal ],
      'VisitedEveryday': [ models.VisitedTotal ],
      'Identities': [ models.TempLogs ]
    }
  }
};
